package day11;

import day10.Tiger;
import day9.java86.Dog;
import day9.java86.Pet;
import day9.java86.Qie;

/**
 * @author oldliu
 * @since 1.0
 */
//宠物市场
public class Market {
    private String name;
    public Market(String name){
        this.name=name;
    }
    //体现了多态
    public Pet sell(int money){
        if(money>100000){
            return new Tiger("小美丽","母",3);
        }
        if(money>10000){
            return new Qie("小蓝企鹅","公",3,"黑");
        }
        if(money>=1000){
            return new Dog("哮天犬","公","田园犬",1000);
        }
        return null;
    }
}
